{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="/static/css/csdn_header.css">
    <link rel="stylesheet" href="/static/css/user_login.css">
    <link rel="stylesheet" href="{% static '/plugins/bootstrap-3.4.1/css/bootstrap.css' %}">
</head>
<body>
{% include 'csdn_django/header_base.html' %}
<div class="user_container">
    <div class="user-outer-box">
        <form method="post" action="{% url 'user:login' %}" novalidate>
            {% csrf_token %}
            <div class='form-title'>
                <span class="user-outer-box title">登录</span>
            </div>
            <div class="form-group">
                <label>用户名</label>
                {{ form.name }}
                <span style="color: red">{{ form.name.errors.0 }}</span>
            </div>
            <div class="form-group">
                <label>密码</label>
                {{ form.password }}
                <span style="color: red">{{ form.password.errors.0 }}</span>
            </div>
            <div class="form-group">
                <label for="id_card">图片验证码</label>
                <div class="row">
                    <div class="col-xs-7">
                        {{ form.code }}
                        <span style="color: red">{{ form.code.errors.0 }}</span>
                    </div>
                    <div class="col-xs-5">
                        <img id="image_code" src="{% url 'user:image_code' %}" alt="验证码">
                    </div>
                </div>
            </div>
            <input type="submit" value="登录">
        </form>
    </div>
</div>
</body>
</html>